"use strict";
cc._RF.push(module, '6efcdFLOtlPGoYuRVdSUAYF', 'Award');
// scripts/Award.js

"use strict";

var t = require;
var e = module;
var o = exports;

var _i,
    n = void 0 && (void 0).__extends || (_i = function i(t, e) {
  return (_i = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    a = void 0 && (void 0).__decorate || function (t, e, o, i) {
  var n,
      a = arguments.length,
      r = a < 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);else for (var s = t.length - 1; s >= 0; s--) {
    (n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
  }
  return a > 3 && r && Object.defineProperty(e, o, r), r;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});

var r = t("Util"),
    s = cc._decorator,
    l = s.ccclass,
    c = s.property,
    d = function (t) {
  function e() {
    var e = null !== t && t.apply(this, arguments) || this;
    return e.icon = null, e.valueLabel = null, e.value = 0, e.obj = {
      a: 0
    }, e;
  }

  return n(e, t), Object.defineProperty(e.prototype, "Icon", {
    set: function set(t) {
      var e = this;
      this.icon.spriteFrame = t, this.scheduleOnce(function () {
        if (e.icon.node.width > 60) {
          var t = e.icon.node.width / e.icon.node.height;
          e.icon.node.width = 60, e.icon.node.height = 60 / t;
        }
      }, .1);
    },
    enumerable: !1,
    configurable: !0
  }), Object.defineProperty(e.prototype, "Sprite", {
    get: function get() {
      return this.icon;
    },
    enumerable: !1,
    configurable: !0
  }), Object.defineProperty(e.prototype, "Tag", {
    get: function get() {
      return this._tag;
    },
    set: function set(t) {
      this._tag = t;
    },
    enumerable: !1,
    configurable: !0
  }), Object.defineProperty(e.prototype, "Value", {
    get: function get() {
      return this.value;
    },
    set: function set(t) {
      this.obj.a = 0, cc.tween(this.obj).to(1, {
        a: t
      }).start(), this.value = t;
    },
    enumerable: !1,
    configurable: !0
  }), e.prototype.update = function () {
    this.valueLabel.string = r.Util.get_num_processed(this.obj.a);
  }, a([c(cc.Sprite)], e.prototype, "icon", void 0), a([c(cc.Label)], e.prototype, "valueLabel", void 0), a([l], e);
}(cc.Component);

o["default"] = d;

cc._RF.pop();